import React from 'react';
import {
  AppRegistry,
  Text,
  View,
  Button
} from 'react-native';
import { StackNavigator ,DrawerNavigator} from 'react-navigation';
import MyHomeScreen from './MyHomeScreen'
import ChatScreen from './ChatScreen'
export default class HomeScreen extends React.Component {
  static navigationOptions=({navigation})=>{
    return ({
      title: '首页',
      headerLeft:<Button  title={'打开侧边栏'} onPress={()=>navigation.navigate('DrawerOpen')}/>,
    })
  }
  render() {
  return (
    <View>
      <Text>首页!</Text>
      <Button
        onPress={() => this.props.navigation.navigate('MyHomeScreen')}
        title="跳转 MyHomeScreen"
      />
    </View>
  );
}
}


// export default StackNavigator({
//   Home: { screen: HomeScreen },
//   Chat: { screen: MyHomeScreen },
//     Chat1: { screen: ChatScreen }
// });
